"""
The Foxtalk Compiler

The compiler can be roughly divided into 3 parts:
 1. Frontend (Lexer, Parser, Semantic Analysis)
 2. Midend (IR Generation, CFG, Optimisation)
 3. Backend (Code Generation, Image Generation)

The L{compiler driver<Compiler>} manages the various steps of the compilation process. The common case is not compiling a set of source files (this is only the case during initial image generation), but rather recompiling a single method in a live image.

The compilation process is as follows:
 1. L{Compiler.compileMethod()<c.compiler.compiler.Compiler.compileMethod>} is called from the UI with a method's new source, and its L{SpyClass}.
 2. The method is lexed and L{parsed<c.compiler.parse.Parser.parseMethodFromSource>} resulting in an L{IRMethod}.
 3. The method is checked by the L{Semantic Checker<Checker>}, generating an updated L{SpyMethod} from the IRMethod.
 4. Method dependencies are updated.
 5. L{IR-Level optimisations<c.compiler.opt.iropt>} are performed.
 6. CFG conversion is performed on the IR.
 7. L{BB-Level optimisations<c.compiler.opt.bbopt>} are performed.
 8. Bytecode Generation takes place.
 9. Dependant methods are recompiled (since they may have L{inlined<OptInline>} previous versions of this method)

At this point the SpyClasses representing the image are up to date (in terms of the bytecode in their methods). A call to L{CMG.saveToBuf()<c.compiler.cmg.CMG.saveToBuf>} will generate the binary L{CMG} image from the current image in L{Memory}.
"""
